/*
 * File         : cym_config.h
 * Version      : 0.4.0
 * Author       : Vincent Cheung
 * Date         : Oct. 30, 2013
 * Description  : This file contains all the configuration for kernel.
 *
 * Copyright (C) 2013, CYM Co., Ltd.
 *
 * Change Logs  :
 * Date                 Author          Notes
 * Oct. 30, 2013        Vincent         first version
 * Oct. 31, 2013        Vincent         add CYM_DATA_LENGTH
 * Nov. 01, 2013        Vincent         add tick per second macros for timer
 * Nov. 05, 2013        Vincent         add interrupt macros support
 * Nov. 06, 2013        Vincent         add inline support
 * Nov. 18, 2013        Vincent         add key support
 *
 */

#ifndef __CYM_CONFIG_H__
#define __CYM_CONFIG_H__

//#pragma ei
//#pragma di

/* SECTION: configuration for CPU */
#define CYM_USING_16BIT_CPU                     /* use 16 bit CPU */
/* configuration for interrupt */
#define CYM_ENABLE_INTERRUPT()          EI()
#define CYM_DISABLE_INTERRUPT()         DI()

//#define CYM_USING_INLINE                        /* use inline if supports */
//#define CYM_USING_MALLOC                        /* use the malloc if available*/

/* SECTION: configuration for timer */
#define CYM_USING_SOFT_TIMER                    /* use software timer */
//#define CYM_USING_HIGH_PREC_TIMER               /* use high precision hardware timer */
#define CYM_SYSTEM_TICK_PER_SECOND      100     /* ticks per second of system tick timer */
#ifdef CYM_USING_HIGH_PREC_TIMER
#define CYM_HIGH_PREC_TICK_PRE_SECOND   1000    /* ticks per second of high precision timer */
#endif

/* SECTION: configuration for device */
#define CYM_NAME_MAX                    16      /* maximum length of device name */
/* configuration for net device */
#define CYM_USING_NET                           /* use net device */
#define CYM_DATA_LENGTH                 8       /* the data length in net data */

/* SECTION: configuration for key */
#define CYM_USING_KEY                           /* use key */
#ifdef CYM_USING_KEY
#define KEY_FILTER_FACTOR               20      /**< the key filter factor */
#define SHORT_PRESS_TIME                1000    /**< short key's pressing time less than 1000ms */
#define LONG_PRESS_TIME                 2000    /**< long key's pressing time more than 2000ms */
#define LONG_LONG_PRESS_TIME            30000   /**< long long key's pressing time more than 30000ms */
#endif

#endif /* __CYM_CONFIG_H__ */
